package com.ruoyi.common.core.redis.fake.service.impl;

import com.ruoyi.common.core.redis.fake.domain.SysFakeRedisCache;
import com.ruoyi.common.core.redis.fake.mapper.SysFakeRedisCacheMapper;
import com.ruoyi.common.core.redis.fake.service.ISysFakeRedisCacheService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collection;
import java.util.List;

/**
 * 参数配置 服务层实现
 *
 * @author ruoyi
 */
@Service
public class SysFakeRedisCacheServiceImpl implements ISysFakeRedisCacheService
{

    @Autowired
    private SysFakeRedisCacheMapper fakeRedisCacheMapper;

    @Override
    public SysFakeRedisCache selectCache(String key)
    {
        return fakeRedisCacheMapper.selectCache(key);
    }

    @Override
    public  List<SysFakeRedisCache> selectCacheList(Collection<String> keys)
    {
        return fakeRedisCacheMapper.selectCacheList(keys);
    }

    @Override
    public int insertCache(SysFakeRedisCache cache)
    {
        return fakeRedisCacheMapper.insertCache(cache);
    }

    @Override
    public int updateCache(SysFakeRedisCache cache)
    {
        return fakeRedisCacheMapper.updateCache(cache);
    }

    @Override
    public void deleteCacheByKeys(Collection<String> keys)
    {
        fakeRedisCacheMapper.deleteCacheByKeys(keys);
    }

    @Override
    public void deleteCacheByKey(String key){
        fakeRedisCacheMapper.deleteCacheByKey(key);
    }

    @Override
    public Collection<String> keys( String pattern){
        return fakeRedisCacheMapper.keys(pattern);
    }
}
